<html>
<head><meta charset="utf-8"><title>Thinking about partial stabilization · project-portable-simd · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/index.html">project-portable-simd</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Thinking.20about.20partial.20stabilization.html">Thinking about partial stabilization</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="210795889"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Thinking%20about%20partial%20stabilization/near/210795889" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Thinking.20about.20partial.20stabilization.html#210795889">(Sep 21 2020 at 20:32)</a>:</h4>
<p>So, this project is obviously related to const generics, including min_const_generics, but I was also thinking about how const generics are proceeding relative to the project as a whole, and this post.<br>
<a href="https://without.boats/blog/shipping-const-generics/">https://without.boats/blog/shipping-const-generics/</a><br>
Basically, "in order to ship, we decided to ship an early minimal phase." And then there was an <em>explosion of interest</em>, including help, the moment people could latch on to "oh, this is a real thing." I think that, especially in order to achieve the goals of stabilizing something in 2021, we should think about that as a possible target: everything can hit nightly basically as soon as we're ready, obviously, but we might want to allow ourselves to stabilize portable SIMD types progressively, rather than an all-at-once. Even stabilizing <em>literally just</em> u8x16 would be a big win since that lets people write SIMD-accelerated UTF8 processing, though obviously we should probably set our sights a <em>little</em> higher than that.</p>



<a name="210800611"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Thinking%20about%20partial%20stabilization/near/210800611" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ashley Mannix <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Thinking.20about.20partial.20stabilization.html#210800611">(Sep 21 2020 at 21:10)</a>:</h4>
<p><span class="user-mention" data-user-id="281757">@Jubilee</span> Absolutely! I think we’re lucky we can easily slice up the API any way we want to stabilize it in piecemeal but useful chunks</p>



<a name="210802736"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Thinking%20about%20partial%20stabilization/near/210802736" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Thinking.20about.20partial.20stabilization.html#210802736">(Sep 21 2020 at 21:30)</a>:</h4>
<p>Having a minimal subset of this is fairly trivial. Because SIMD is basically "math, but (probably) faster" we can stabilize even individual methods at a time once the initial types are set.</p>
<p>The one thing we <em>can't</em> do (with current stabilization mechanisms) is stabilize both a type and a trait but <em>not</em> the specific impls of that trait.</p>



<a name="210802849"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Thinking%20about%20partial%20stabilization/near/210802849" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Thinking.20about.20partial.20stabilization.html#210802849">(Sep 21 2020 at 21:31)</a>:</h4>
<p>And we'll <em>probably</em> want some new traits as part of this API, though they wouldn't go in the initial set of things.</p>



<a name="210803169"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Thinking%20about%20partial%20stabilization/near/210803169" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Thinking.20about.20partial.20stabilization.html#210803169">(Sep 21 2020 at 21:34)</a>:</h4>
<p>So if we stabilize a trait, and a type, the impl of that trait for that type is autostable, correct? But if either is unstable, then the impl is unstable.</p>



<a name="210803232"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Thinking%20about%20partial%20stabilization/near/210803232" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Thinking.20about.20partial.20stabilization.html#210803232">(Sep 21 2020 at 21:35)</a>:</h4>
<p>correct</p>



<a name="210803700"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Thinking%20about%20partial%20stabilization/near/210803700" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Thinking.20about.20partial.20stabilization.html#210803700">(Sep 21 2020 at 21:39)</a>:</h4>
<p>My thoughts are that it may not make sense to stabilize these traits (depending on the trait, of course) until all of the types are stabilized.  The first thing that comes to mind is that whatever is appropriate for integers may not necessarily be appropriate for floating-point</p>



<a name="210804636"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Thinking%20about%20partial%20stabilization/near/210804636" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Thinking.20about.20partial.20stabilization.html#210804636">(Sep 21 2020 at 21:48)</a>:</h4>
<p>Yeah, probably integer types and floating types would each have mostly similar traits that are still distinct, to best capture their operations. The exact design is sorta far out there. I think the main detail within the next few months is just the idea that "this project will involve some new traits at some point".</p>



<a name="210804698"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Thinking%20about%20partial%20stabilization/near/210804698" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Thinking.20about.20partial.20stabilization.html#210804698">(Sep 21 2020 at 21:48)</a>:</h4>
<p>Should probably make a thread just for talking about OH GOD FLOATS. <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span> The cross-platform issues with them are... fun!</p>



<a name="210804838"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Thinking%20about%20partial%20stabilization/near/210804838" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Thinking.20about.20partial.20stabilization.html#210804838">(Sep 21 2020 at 21:50)</a>:</h4>
<p>Actually if you just ignore i586... neon and sse both behave reasonably well and reasonably similar. :P</p>



<a name="210804911"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Thinking%20about%20partial%20stabilization/near/210804911" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Thinking.20about.20partial.20stabilization.html#210804911">(Sep 21 2020 at 21:51)</a>:</h4>
<p>on aarch64! ARMv7 Neon works differently than aarch64 Neon _just_ for floats.</p>



<a name="210805056"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Thinking%20about%20partial%20stabilization/near/210805056" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Thinking.20about.20partial.20stabilization.html#210805056">(Sep 21 2020 at 21:52)</a>:</h4>
<p>blast, i'll have to keep <em>two</em> raspberry pis available to work with I suppose.</p>



<a name="210805529"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Thinking%20about%20partial%20stabilization/near/210805529" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Thinking.20about.20partial.20stabilization.html#210805529">(Sep 21 2020 at 21:57)</a>:</h4>
<p>Not really, 64-bit ARM systems can run 32-bit binaries.</p>



<a name="210805536"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Thinking%20about%20partial%20stabilization/near/210805536" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Thinking.20about.20partial.20stabilization.html#210805536">(Sep 21 2020 at 21:57)</a>:</h4>
<p>wow you have a pre-Raspi 3?</p>



<a name="210805609"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Thinking%20about%20partial%20stabilization/near/210805609" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Thinking.20about.20partial.20stabilization.html#210805609">(Sep 21 2020 at 21:58)</a>:</h4>
<p>that doesn't mean that they emulate the float flushing behavior. OH GOD WE HAVE TO FIND OUT <span aria-label="shock" class="emoji emoji-1f628" role="img" title="shock">:shock:</span></p>



<a name="210805626"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Thinking%20about%20partial%20stabilization/near/210805626" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Thinking.20about.20partial.20stabilization.html#210805626">(Sep 21 2020 at 21:58)</a>:</h4>
<p>They do.</p>



<a name="210805658"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Thinking%20about%20partial%20stabilization/near/210805658" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Thinking.20about.20partial.20stabilization.html#210805658">(Sep 21 2020 at 21:58)</a>:</h4>
<p>oh, well...<br>
...<br>
I mean, that does make things simpler.</p>



<a name="210805805"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Thinking%20about%20partial%20stabilization/near/210805805" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Thinking.20about.20partial.20stabilization.html#210805805">(Sep 21 2020 at 22:00)</a>:</h4>
<p>Specifically, ARMv7 SIMD instructions will: 1) ignore the rounding mode in the FPSCR and assume round-to-nearest. 2) Flush denormals to zero. 3) Not propagate NaN payloads (it returns a default NaN instead).</p>



<a name="210805814"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Thinking%20about%20partial%20stabilization/near/210805814" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Thinking.20about.20partial.20stabilization.html#210805814">(Sep 21 2020 at 22:00)</a>:</h4>
<p><span class="user-mention" data-user-id="143274">@Amanieu</span> when i tried to cross-compile and run arm32 on my arm64 rpi the other day things went bad (missing files or whatever), but i'll PM you or something sometime if i try again.</p>



<a name="210805853"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Thinking%20about%20partial%20stabilization/near/210805853" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ashley Mannix <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Thinking.20about.20partial.20stabilization.html#210805853">(Sep 21 2020 at 22:01)</a>:</h4>
<p>Drop a <span aria-label="wave" class="emoji emoji-1f44b" role="img" title="wave">:wave:</span> reaction if you’re here</p>



<a name="210805876"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Thinking%20about%20partial%20stabilization/near/210805876" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Thinking.20about.20partial.20stabilization.html#210805876">(Sep 21 2020 at 22:01)</a>:</h4>
<p>Use static linking to avoid issues. Or get an arm32 chroot.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>